﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace HigLabo.Net.WindowsLive
{
    /// <summary>
    /// 
    /// </summary>
    public partial class WindowsLiveClient
    {        
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<User> GetUserAsync()
        {
            return AsyncCall<User>(this.GetUser);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<User> GetUserAsync(String id)
        {
            return AsyncCall<String, User>(this.GetUser, id);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<User> GetUserAsync(GetUserCommand command)
        {
            return AsyncCall<GetUserCommand, User>(this.GetUser, command);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<LiveObjectCollection> GetFilesAsync(GetFilesCommand command)
        {
            return AsyncCall<GetFilesCommand, LiveObjectCollection>(this.GetFiles, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> GetFileAsync(GetFileCommand command)
        {
            return AsyncCall<GetFileCommand, File>(this.GetFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderID"></param>
        /// <returns></returns>
        public Task<Folder> GetFolderAsync(String folderID)
        {
            return AsyncCall<String, Folder>(this.GetFolder, folderID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> GetFolderAsync(GetFolderCommand command)
        {
            return AsyncCall<GetFolderCommand, Folder>(this.GetFolder, command);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileID"></param>
        /// <returns></returns>
        public Task<File> GetFileAsync(String fileID)
        {
            return AsyncCall<String, File>(this.GetFile, fileID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="photoID"></param>
        /// <returns></returns>
        public Task<Photo> GetPhotoAsync(String photoID)
        {
            return AsyncCall<String, Photo>(this.GetPhoto, photoID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="videoID"></param>
        /// <returns></returns>
        public Task<Video> GetVideoAsync(String videoID)
        {
            return AsyncCall<String, Video>(this.GetVideo, videoID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="audioID"></param>
        /// <returns></returns>
        public Task<Audio> GetAudioAsync(String audioID)
        {
            return AsyncCall<String, Audio>(this.GetAudio, audioID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="albumID"></param>
        /// <returns></returns>
        public Task<Album> GetAlbumAsync(String albumID)
        {
            return AsyncCall<String, Album>(this.GetAlbum, albumID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<ApplicationCollection> GetApplicationsAsync(GetApplicationsCommand command)
        {
            return AsyncCall<GetApplicationsCommand, ApplicationCollection>(this.GetApplications, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Application> CreateApplicationAsync(CreateApplicationCommand command)
        {
            return AsyncCall<CreateApplicationCommand, Application>(this.CreateApplication, command);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> UpdateFilePropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, File>(this.UpdateFileProperties, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> UpdateFolderPropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, Folder>(this.UpdateFolderProperties, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Photo> UpdatePhotoPropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, Photo>(this.UpdatePhotoProperties, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Audio> UpdateAudioPropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, Audio>(this.UpdateAudioProperties, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Video> UpdateVideoPropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, Video>(this.UpdateVideoProperties, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Album> UpdateAlbumPropertiesAsync(UpdateFileCommand command)
        {
            return AsyncCall<UpdateFileCommand, Album>(this.UpdateAlbumProperties, command);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileID"></param>
        /// <returns></returns>
        public Task<String> GetDownloadFilePathAsync(String fileID)
        {
            return AsyncCall<String, String>(this.GetDownloadFilePath, fileID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="fileID"></param>
        /// <returns></returns>
        public Task<Byte[]> DownloadFileAsync(String fileID)
        {
            return AsyncCall<String, Byte[]>(this.DownloadFile, fileID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> PostFileAsync(PostFileCommand command)
        {
            return AsyncCall<PostFileCommand, String>(this.PostFile, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteFileAsync(DeleteFileCommand command)
        {
            return AsyncCall<DeleteFileCommand, String>(this.DeleteFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteFolderAsync(DeleteFolderCommand command)
        {
            return AsyncCall<DeleteFolderCommand, String>(this.DeleteFolder, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Event> GetEventAsync(GetEventCommand command)
        {
            return AsyncCall<GetEventCommand, Event>(this.GetEvent, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<EventCollection> GetEventsAsync(GetEventsCommnad command)
        {
            return AsyncCall<GetEventsCommnad, EventCollection>(this.GetEvents, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteEventAsync(DeleteEventCommand command)
        {
            return AsyncCall<DeleteEventCommand, String>(this.DeleteEvent, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Event> CreateEventAsync(CreateEventCommand command)
        {
            return AsyncCall<CreateEventCommand, Event>(this.CreateEvent, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Permissions> GetPermissionsAsync(GetPermissionsCommnad command)
        {
            return AsyncCall<GetPermissionsCommnad, Permissions>(this.GetPermissions, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Tag> GetTagAsync(GetTagCommand command)
        {
            return AsyncCall<GetTagCommand, Tag>(this.GetTag, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<TagCollection> GetTagsAsync(GetTagsCommnad command)
        {
            return AsyncCall<GetTagsCommnad, TagCollection>(this.GetTags, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Result> UploadFileAsync(UploadFileCommand command)
        {
            return AsyncCall<UploadFileCommand, Result>(this.UploadFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> CreateFolderAsync(PostCommand command)
        {
            return AsyncCall<PostCommand, Folder>(this.CreateFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Album> CreateAlbumAsync(PostCommand command)
        {
            return AsyncCall<PostCommand, Album>(this.CreateAlbum, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Activity> CreateActivityAsync(CreateActivityCommand command)
        {
            return AsyncCall<CreateActivityCommand, Activity>(this.CreateActivity, command);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> MoveFileFolderAsync(MoveFileCommand command)
        {
            return AsyncCall<MoveFileCommand, String>(this.MoveFileFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> CopyFileFolderAsync(CopyFileCommand command)
        {
            return AsyncCall<CopyFileCommand, String>(this.CopyFileFolder, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<Contacts> GetContactsAsync()
        {
            return AsyncCall<Contacts>(this.GetContacts);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Contacts> GetContactsAsync(GetContactsCommand command)
        {
            return AsyncCall<GetContactsCommand, Contacts>(this.GetContacts, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<CommentCollection> GetCommentsAsync(GetCommentsCommnad command)
        {
            return AsyncCall<GetCommentsCommnad, CommentCollection>(this.GetComments, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="commentID"></param>
        /// <returns></returns>
        public Task<Comment> GetCommentAsync(String commentID)
        {
            return AsyncCall<String, Comment>(this.GetComment, commentID);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<CalendarCollection> GetCalendarsAsync(GetCalendarsCommand command)
        {
            return AsyncCall<GetCalendarsCommand, CalendarCollection>(this.GetCalendars, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="calendarID"></param>
        public Task<Calendar> GetCalendarAsync(String calendarID)
        {
            return AsyncCall<String, Calendar>(this.GetCalendar, calendarID);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Calendar> CreateCalendarAsync(CreateCalendarCommand command)
        {
            return AsyncCall<CreateCalendarCommand, Calendar>(this.CreateCalendar, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Calendar> UpdateCalenderAsync(UpdateCalendarCommand command)
        {
            return AsyncCall<UpdateCalendarCommand, Calendar>(this.UpdateCalender, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteCalendarAsync(DeleteCalendarCommand command)
        {
            return AsyncCall<DeleteCalendarCommand, String>(this.DeleteCalendar, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<FriendCollertion> GetFriendsAsync(GetFriendsCommand command)
        {
            return AsyncCall<GetFriendsCommand, FriendCollertion>(this.GetFriends, command);
        }
    }
}

